package com.base.dehong.http;

import com.base.dehong.util.ToastUtils;

import android.content.Context;
import android.text.TextUtils;

public abstract class RequestCallBack<T> {

	public RequestCallBack() {
		super();
	}
	
	public void onSuccess(T info){
		end();
	};
	
	public abstract void end();
	
	public void onFailure(Context context,String string){
		if (!TextUtils.isEmpty(string)) {
			ToastUtils.show(context, string);
		}
		onFailure();
	};

	public void onFailure(){
		end();
	};
}
